package com.xhwy.mapper;

import com.xhwy.entity.Carousel;
import com.xhwy.entity.Product;
import com.xhwy.util.PageUtil;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CarouselMapper {

    /**
     * 获取轮播图列表
     * @param pageUtil
     * @return
     */
    List<Carousel> getBannerList(PageUtil<Product> pageUtil);

    /**
     * 根据优先级查询指定条数的轮播图
     * @param limit
     * @return
     */
    List<Carousel> getAllByPriority(Integer limit);
}
